#include <stdio.h>
#include <string.h>
#include <math.h>

int nL=0, nN=0;

int statistics(char *s)
{
    int i;
    while(*s!='\0')
    {
        if((*s<='Z'&&*s>='A')||(*s<='z'&&*s>='a'))nL++;
        if(*s<='9'&&*s>='0')nN++;
        if(*s==' ')i++;
        s++;
    }
    return i;
}

int main()
{
    char s[81];
    int nS;
    gets(s);
    nS = statistics(s);

    printf("%d %d %d\n", nL, nN, nS);
    return 0;
}
